home *** CD-ROM | disk | FTP | other *** search
/ Windows News 2005 November / WNnov2005.iso / Windows / Indispensables / Movie Collection / MovieCollection5403.exe / {app} / php5 / replace.class.php < prev    next >
PHP Script  |  2005-02-21  |  863b  |  25 lines

  1. <?php
  2.  
  3. require_once('params.class.php');
  4.  
  5. class TmcXslReplace
  6. {
  7.    private $Fxml = '';
  8.    
  9.    function __construct($Axml)
  10.    {
  11.       $this->Fxml = $Axml;
  12.    }
  13.    
  14.    function processReplace()
  15.    {
  16.       $this->Fxml = str_replace('href="index"', 'href="index'.$_SESSION["mc_params"]->getPhpExtension().'"', $this->Fxml);
  17.       $this->Fxml = str_replace('action="films"', 'action="films'.$_SESSION["mc_params"]->getPhpExtension().'"', $this->Fxml);
  18.       $this->Fxml = str_replace('href="films"', 'href="films'.$_SESSION["mc_params"]->getPhpExtension().'"', $this->Fxml);
  19.       $this->Fxml = str_replace('film?', 'film'.$_SESSION["mc_params"]->getPhpExtension().'?', $this->Fxml);
  20.       $this->Fxml = str_replace('getimg?idx=', 'getimg'.$_SESSION["mc_params"]->getPhpExtension().'?idx=', $this->Fxml);
  21.       return $this->Fxml;
  22.    }
  23. }
  24.    
  25. ?>